-
Notifications
You must be signed in to change notification settings - Fork 890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let rb status controller onCreate predicate return true #5865
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5865 +/- ##
==========================================
- Coverage 46.32% 46.20% -0.13%
==========================================
Files 661 663 +2
Lines 54400 54598 +198
==========================================
+ Hits 25200 25225 +25
- Misses 27576 27751 +175
+ Partials 1624 1622 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/assign
Thanks for spotting. It makes sense to me.
But I will see if there is any potential side effect, basically reconciling a ResourceBinding before scheduling.
Another approach is letting the karmada/pkg/controllers/status/common.go Line 80 in 478b8c6
Which approach do you prefer? @zach593 @chaunceyjiang @XiShanYongYe-Chang |
I think this is some kind of self-checking of rb/crb, and from this point of view, introducing more interdependencies between objects is unnecessary. |
I agree with this approach. |
Hi @zach593, Are you referring to the concern that duplicate rb/crbs are being processed? I understand that we have increased attention to the create event, the only reason is to worry about controller restart, am I right? |
In my opinion, both approaches should work, considering that the number of ResourceBinding is less than the number of Works, I prefer the first one(the current PR approaches). @XiShanYongYe-Chang Can you explain why you prefer the second approach? @zach593 Do you think this patch would have an impact on performance? |
No, unually extra reconciliation should not be harmful, unless it runs into some performance issues.
Yes, this PR is mainly focused on controller restarts |
After #5779, I think it should not. I remember in the first test report in #5779 (comment), I added a test that with this predicate return true, and basically this predicate caused no impact. |
I end up leaning towards this way:
But I still don't understand the meaning of the second half of the sentence. |
Our goal is to add a self-check mechanism to the status of RB. From a design perspective, when faced with multiple options, if one option can reduce dependencies on other resources, it helps clarify the boundaries between subsystems, achieving what is known as "low in coupling and high in cohesion." From this perspective, the first option is preferable. |
Signed-off-by: zach593 <[email protected]>
88d30b2
to
302d545
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@XiShanYongYe-Chang What do you say?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I agree.
/lgtm
Do we need a release note and cherry-pick it to the previous branch? |
No strong opinion from me. @zach593 what do you say? I added a release notes, by the way. |
cool, lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
@XiShanYongYe-Chang Do you think cherry-pick is needed?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
According to cherry-pick, the current pr meets the standard, let me build an issue to track it. |
…#5865-upstream-release-1.10 Automated cherry pick of #5865: let rb status controller onCreate predicate return true
…#5865-upstream-release-1.11 Automated cherry pick of #5865: let rb status controller onCreate predicate return true
…#5865-upstream-release-1.9 Automated cherry pick of #5865: let rb status controller onCreate predicate return true
What type of PR is this?
/kind bug
What this PR does / why we need it:
Currently, the rb/crb status controller watchs rb/crb and work, but the predicates for creating events are all false, which means that if the work status is up to date, but the queue of the rb/crb status controller is not cleared, and it crashes, these unprocessed items will not be requeued after the next restart, and the status of rb/crb and workload will not be updated, until the relevant member cluster objects update the status again, triggering the work status controller and rb/crb status controller to process again.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: